<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>回答_骡窝窝问答</title>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui,viewport-fit=cover"/>
    <meta name="copyright" content="Copyright (c) 2006-2019 Mafengwo."/>
    <meta name="format-detection" content="telephone=no,address=no"/>
    <meta name="referrer" content="always"/>
    <link href="/css/question/mobile+css+head_mobile+css+ui.css"
          rel="stylesheet" type="text/css">
    <link href="https://css.mafengwo.net/mobile/css/ask/ask.css?1550829726" rel="stylesheet" type="text/css"/>
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/plugins/form/jquery.form.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/plugins/eleditor/Eleditor.min.js"></script>
    <script src="/js/plugins/eleditor/webuploader.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/checkLogin.js"></script>
    <script>
        $(function () {
            var params = getParams();
            if (params.id) {
                //回显问题的标题
                $.get(baseUrl + "/questions/" + params.id, function (data) {
                    //为回答编辑页面设置问题标题
                    $(".replycon").html(data.title);
                    //回答的是哪个问题
                    $("#questionId").val(data.id);
                });
            }
            //点击发布问题提交问题表单
            $("#reply").click(function () {
                $("#replyEditor").ajaxSubmit({
                    url: baseUrl + "/questions/" + params.id + "/questionReplies",
                });
                //跳转到回答列表
                window.location.href = "/answer.html?id=" + params.id;
            });

            // 上传图片事件
            $(".imgs .rect").click(function () {
                div = this;
                $("#fileInput").click();
            });


        })

    </script>

</head>
<body>
<div id="pos38"></div>
<header class="head2home">
    <div class="rBtn">
        <a href="/index.html" class="home">首页</a>
    </div>
</header>


<section class="Addnew">
    <form id="replyEditor" method="post">
        <input type="hidden" name="questionId" id="questionId">
        <div id="_j_publish_box" class="ask_tan_con">
            <dl>
                &nbsp;<div class="replycon" name="QuestionTitle">
            </div>
            </dl>
            <br>
            <br>
            <dl>
                <dd class="con_textarea _j_word" id="con_textarea">
                    <textarea name="replyContent" rows=1 id="pnl_textarea" class="_j_q_content _j_word_check"></textarea>
                </dd>
            </dl>
        </div>

        <dl>
            <dd>
                <a class="_j_publish_question" id="reply">回答</a>
            </dd>
        </dl>
    </form>
</section>

</body>
</html>
